package jsyf.oa.entity.device;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by y on 2018/4/16.
 */
@Entity
@Table(name = "T_DVC_SERVICE", schema = "oa", catalog = "")
public class DeviceServiceEntity extends BaseEntity {

    private String fkCompanyId;

    private String fkBrandId;

    private String companyName;

    private String brandName;

    private String fkDeviceTypeId;

    private String deviceTypeName;

    private String fkModelId;

    private String modelName;

    private String sequence;

    private String saledType;

    private String years;

    private String deliveryDate ;

    private String hours;

    private String customerName;

    private String customerTel;

    private String adminName;

    private String adminTel;

    private String operatorName;

    private String operatorTel;

    private String remark;

    private String configuration;

    public String getFkCompanyId() {
        return fkCompanyId;
    }

    public void setFkCompanyId(String fkCompanyId) {
        this.fkCompanyId = fkCompanyId;
    }

    public String getFkBrandId() {
        return fkBrandId;
    }

    public void setFkBrandId(String fkBrandId) {
        this.fkBrandId = fkBrandId;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getFkDeviceTypeId() {
        return fkDeviceTypeId;
    }

    public void setFkDeviceTypeId(String fkDeviceTypeId) {
        this.fkDeviceTypeId = fkDeviceTypeId;
    }

    public String getDeviceTypeName() {
        return deviceTypeName;
    }

    public void setDeviceTypeName(String deviceTypeName) {
        this.deviceTypeName = deviceTypeName;
    }

    public String getSequence() {
        return sequence;
    }

    public void setSequence(String sequence) {
        this.sequence = sequence;
    }

    public String getSaledType() {
        return saledType;
    }

    public void setSaledType(String saledType) {
        this.saledType = saledType;
    }

    public String getYears() {
        return years;
    }

    public void setYears(String years) {
        this.years = years;
    }

    public String getHours() {
        return hours;
    }

    public void setHours(String hours) {
        this.hours = hours;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerTel() {
        return customerTel;
    }

    public void setCustomerTel(String customerTel) {
        this.customerTel = customerTel;
    }

    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        this.adminName = adminName;
    }

    public String getAdminTel() {
        return adminTel;
    }

    public void setAdminTel(String adminTel) {
        this.adminTel = adminTel;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    public String getOperatorTel() {
        return operatorTel;
    }

    public void setOperatorTel(String operatorTel) {
        this.operatorTel = operatorTel;
    }

    public String getFkModelId() {
        return fkModelId;
    }

    public void setFkModelId(String fkModelId) {
        this.fkModelId = fkModelId;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public String getDeliveryDate() {
        return deliveryDate;
    }

    public void setDeliveryDate(String deliveryDate) {
        this.deliveryDate = deliveryDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getConfiguration() {
        return configuration;
    }

    public void setConfiguration(String configuration) {
        this.configuration = configuration;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID",this.getId());
        obj.put("FK_COMPANY_ID", this.getFkCompanyId());
        obj.put("FK_BRAND_ID",this.getFkBrandId());
        obj.put("COMPANY_NAME",this.getCompanyName());
        obj.put("BRAND_NAME", this.getBrandName());
        obj.put("FK_DEVICE_TYPE_ID", this.getFkDeviceTypeId());
        obj.put("FK_MODEL_ID",this.getFkModelId());
        obj.put("MODEL_NAME",this.getModelName());
        obj.put("DEVICE_TYPE_NAME",this.getDeviceTypeName());
        obj.put("SEQUENCE", this.getSequence());
        obj.put("SALED_TYPE",this.getSaledType());
        obj.put("DELIVERY_DATE",this.getDeliveryDate());
        obj.put("YEARS", this.getYears());
        obj.put("HOURS", this.getHours());
        obj.put("CUSTOMER_NAME", this.getCustomerName());
        obj.put("CUSTOMER_TEL", this.getCustomerTel());
        obj.put("ADMIN_NAME", this.getAdminName());
        obj.put("ADMIN_TEL", this.getAdminTel());
        obj.put("OPERATOR_NAME",this.getOperatorName());
        obj.put("OPERATOR_TEL",this.getOperatorTel());
        obj.put("REMARK",this.getRemark());
        obj.put("DEL_FLAG", this.getDelFlag());
        obj.put("CONFIGURATION",this.getConfiguration());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_DVC_SERVICE";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("FK_COMPANY_ID", "fkCompanyId");
        obj.put("FK_BRAND_ID", "fkBrandId");
        obj.put("COMPANY_NAME","companyName");
        obj.put("BRAND_NAME", "brandName");
        obj.put("FK_DEVICE_TYPE_ID", "fkDeviceTypeId");
        obj.put("DEVICE_TYPE_NAME", "deviceTypeName");
        obj.put("FK_MODEL_ID","fkModelId");
        obj.put("MODEL_NAME","modelName");
        obj.put("SEQUENCE", "sequence");
        obj.put("SALED_TYPE", "saledType");
        obj.put("DELIVERY_DATE","deliveryDate");
        obj.put("YEARS", "years");
        obj.put("HOURS", "hours");
        obj.put("CUSTOMER_NAME", "customerName");
        obj.put("CUSTOMER_TEL", "customerTel");
        obj.put("ADMIN_NAME", "adminName");
        obj.put("ADMIN_TEL", "adminTel");
        obj.put("OPERATOR_NAME", "operatorName");
        obj.put("OPERATOR_TEL", "operatorTel");
        obj.put("REMARK","remark");
        obj.put("DEL_FLAG", "delFlag");
        obj.put("CONFIGURATION", "configuration");
        return obj;
    }
}
